<?php
/**
 * Created by PhpStorm.
 * User: 17828
 * Date: 2018/10/12
 * Time: 9:36
 */
namespace app\common\model;
use think\Model;
class Signin extends Model
{
    public function getSignLog($field,$where,$page,$limit){
        $list['data'] = db('signin')->alias('sg')
            ->field($field)
            ->join('drive d','d.drive_id = sg.drive_id')
            ->join('store s','s.store_id = d.store_id')
            ->where($where)
            ->page($page,$limit)
            ->order('signin_id desc')
            ->select();
        $list['count'] = db('signin')->alias('sg')
            ->field($field)
            ->join('drive d','d.drive_id = sg.drive_id')
            ->join('store s','s.store_id = d.store_id')
            ->where($where)
            ->select();
        return $list;
    }
}